package com.cnswhy.cloud.server.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.cnswhy.cloud.common.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author cnswhy
 * @since 2020-10-16
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_spell_report")
@ApiModel(value = "SpellReport", description = "")
@AllArgsConstructor
public class SpellReport extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "")
    @TableField("total_money")
    @Excel(name = "总成交金额")
    private BigDecimal totalMoney;

    @ApiModelProperty(value = "")
    @TableField("cost_money")
    @Excel(name = "总成本金额")
    private BigDecimal costMoney;
    @ApiModelProperty(value = "")
    @TableField("total_split")
    @Excel(name = "总参团奖励")
    private BigDecimal totalSplit;

    @ApiModelProperty(value = "")
    @TableField("love_money")
    @Excel(name = "参团收益")
    private BigDecimal loveMoney;

    @ApiModelProperty(value = "")
    @TableField("contribution_money")
    @Excel(name = "贡献收益")
    private BigDecimal contributionMoney;

    @ApiModelProperty(value = "")
    @TableField("spell_money")
    @Excel(name = "拼团红包")
    private BigDecimal spellMoney;
    @ApiModelProperty(value = "")
    @TableField("team_money")
    @Excel(name = "队长分红")
    private BigDecimal teamMoney;
    @TableField("consume_money")
    @Excel(name = "消费分红")
    private BigDecimal consumeMoney;
    @TableField("split_money")
    @Excel(name = "总拼团分账")
    private BigDecimal splitMoney;
    @TableField("small_money")
    @Excel(name = "总小队奖励")
    private BigDecimal smallMoney;
    @TableField("consumer_split_money")
    @Excel(name = "总消费分账")
    private BigDecimal consumerSplitMoney;
    @TableField("center_split")
    @Excel(name = "平台分红")
    private BigDecimal centerSplit;
    @TableField("center_small_split")
    @Excel(name = "平台分红")
    private BigDecimal centerSmallSplit;
    @TableField("total_balance")
    @Excel(name = "总用户余额")
    private BigDecimal totalBalance;
    @TableField("total_split_blanace")
    @Excel(name = "总收益钱包余额")
    private BigDecimal totalSplitBalance;
    @TableField("buy_back_sum")
    @Excel(name = "回购订单")
    private BigDecimal totalBuyBackSum;
    @TableField("send_sum")
    @Excel(name = "发货订单")
    private BigDecimal sendSum;
    @TableField("withdraw_amount")
    @Excel(name = "总提现金额")
    private BigDecimal withdrawAmount;
    @TableField("no_deal_order_sum")
    @Excel(name = "总未处理订单")
    private BigDecimal noDealOrderSum;
    @TableField("no_spell_product_money")
    @Excel(name = "折前总成交金额")
    private BigDecimal noSpellProductMoney;
    @TableField("spell_product_money")
    @Excel(name = "折后总成交金额")
    private BigDecimal spellProductMoney;

    @ApiModelProperty(value = "")
    @NotEmpty(message = "不能为空")
    @Length(max = 18, message = "长度不能超过18")
    @TableField(value = "sett_date", condition = LIKE)
    @Excel(name = "日期")
    private String settDate;


    @Builder
    public SpellReport(Long id, LocalDateTime createTime, LocalDateTime updateTime, Long createUser, Long updateUser, 
                    BigDecimal totalMoney, BigDecimal costMoney, BigDecimal loveMoney, BigDecimal contributionMoney, BigDecimal spellMoney, BigDecimal teamMoney, BigDecimal splitMoney, BigDecimal consumerSplitMoney, String settDate) {
        this.id = id;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.createUser = createUser;
        this.updateUser = updateUser;
        this.totalMoney = totalMoney;
        this.costMoney = costMoney;
        this.loveMoney = loveMoney;
        this.contributionMoney = contributionMoney;
        this.spellMoney = spellMoney;
        this.teamMoney = teamMoney;
        this.splitMoney = splitMoney;
        this.consumerSplitMoney = consumerSplitMoney;
        this.settDate = settDate;
    }

}
